﻿@model Trifecta.Models.Agent

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>Agent</h4>
        <hr />
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.Agent_ID)

        <div class="form-group">
            @Html.LabelFor(model => model.Org_ID, "Org_ID", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("Org_ID", String.Empty)
                @Html.ValidationMessageFor(model => model.Org_ID)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.First_Name, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.First_Name)
                @Html.ValidationMessageFor(model => model.First_Name)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Middle_Initial, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Middle_Initial)
                @Html.ValidationMessageFor(model => model.Middle_Initial)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Last_Name, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Last_Name)
                @Html.ValidationMessageFor(model => model.Last_Name)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Address, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Address)
                @Html.ValidationMessageFor(model => model.Address)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.City, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.City)
                @Html.ValidationMessageFor(model => model.City)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.State, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.State)
                @Html.ValidationMessageFor(model => model.State)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Zipcode, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Zipcode)
                @Html.ValidationMessageFor(model => model.Zipcode)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Phone, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Phone)
                @Html.ValidationMessageFor(model => model.Phone)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Email, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Email)
                @Html.ValidationMessageFor(model => model.Email)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
